package com.web.dao.impl;

import com.web.dao.StudentUpdateDAO;
import com.web.entity.Student;
import com.web.util.JDBCUtils;

/**
 * @author lenovo
 * @Description
 * @Date2025-3-1 22:50
 */
public class StudentUpdateDAOImpl implements StudentUpdateDAO {
    @Override
    public int updateStudentById(Student student){
        String sql="update student_s set name=?,age=?,gender=?,address=?,cellphone=? where id=?";
        Object[] args=new Object[]{
                student.getName(),
                student.getAge(),
                student.getGender(),
                student.getAddress(),
                student.getCellphone(),
                student.getId()
        };
        return JDBCUtils.update(sql, args);
        }
    }

